 <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Settings</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="file:///sdcard/TVATA/logo_img.css" rel="stylesheet" type="text/css" />
<link href="file:///sdcard/TVATA/bgimg.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./js/config.js"></script>
<script type="text/javascript" src="./js/libs/VatataPublic.js"></script>
<script type="text/javascript" src="./js/VatataTips/VatataTips.js"></script>
<script type="text/javascript" src="./js/libs/VatataKeyMove.js"></script>

<script type="text/javascript" src="./js/set.js"></script>

</head>

<body>
<div class="container">
	<div class="header_erji">
    	<div class="title fl">
            
        </div>
        
        <div class="now fr">
            <div class="week fl" id="weekId" style="display:none;"></div>
            <div class="date1 fl">
                <span id="timeId" style="display:none;"></span>
                <span class="time1" id="temperatureId" style="display:none;"></span>
            </div>
            <div class="degrees fl"></div>
            <img onerror="this.src='images/default.png'" style="display:none;" class="fl" id="temperatureImgId">
            <div class="clear"></div>
            
        </div>
        
     <center>
	    <div id="initmsg"  style="font-size: 40px; margin-top: 30px;text-align: center;" >	
	        	Loading ... <span id="tcount"></span>
	    </div>
    </center>
     
     
    </div>
    
    <div class="main main_set" style="padding-left: 300px; display: none;" >
        <a href="javascript:Settings('Wifi')" id="focusId">
        	<div class="bendi"></div>
            <span class="set_title">Network</span>
        </a>
        <!--
        <a href="javascript:Settings('Time')" >
        	<div class="shijian"></div>
            <span class="set_title">Time</span>
        </a>
      
      	<a href="javascript:Settings('Display')">
        	<div class="xianshi"></div>
            <span class="set_title">Display</span>
        </a>
        
        <a href="javascript:Settings('Theme')" id="ThemeId">
        	<div class="zhuti"></div>
            <span class="set_title">Theme</span>
        </a>
        -->
        <a href="javascript:Settings('Server')" id="ServerId">
        	<div class="fuwuqi"></div>
            <span class="set_title">Server</span>
        </a>
        
        <a href="javascript:openLocal();" >
        	<div class="jiazhang"></div>
            <span class="set_title">LocalApps</span>
        </a>
        
        <script>
        function exitapp()
        {
        	var app = wae.create("Application");
        	app.exitSilent();
        }
        
		function openLocal() 
        {
        	location.href="../myapps_zh/index.html";
        }
                
        </script>
        
        <a href="javascript:exitapp();" >
        	<div class="chuc"></div>
            <span class="set_title">Restart</span>
        </a>
        
        <a href="javascript:Settings('About')" id="AboutId">
        	<div class="benji"></div>
            <span class="set_title">About</span>
        </a>
        
        
        
         

    </div>
    <div class="numer" id="versionName"></div>

<p style="clear:both;" />  
<br />
<br />
    <center>
	    <div id="initmsg"  style="font-size: 30px; " >	    	
	    </div>
    </center>
    <script>
    
    	var main_hosturl = waeparams.getContentProviderPersistence("mainhosturl") ;
    	var hurl = main_hosturl.replace("http://", "tva://" ) + "download/ZIP_CONFIG.xml#portal/html/index.html";

		var retry_timeout = parseInt( sessionStorage.getItem("retry_timeout") );
		var retry_count = parseInt( sessionStorage.getItem("retry_count") );
		if ( isNaN(retry_timeout) ) retry_timeout = 10;
		if ( isNaN(retry_count) )   retry_count = 0;
		
		console.log( "retry_timeout: " + retry_timeout + " retry_count: " + retry_count );

		retry_timeout += 30;
		sessionStorage.setItem("retry_timeout", retry_timeout);
		
		retry_count ++;
		sessionStorage.setItem("retry_count", retry_count);

		function showmsg() {
			var msg = "Warning：System is downloading data at "+retry_count+" time, network problem or slow connection may make it failed."
					+ "please check network configuration if something is wrong, and the system will retry in "+retry_timeout+" seconds." ;
					
			document.getElementById("initmsg").innerHTML = msg;
			setTimeout( function() {
					location.href=hurl;
				}, retry_timeout * 1000 );
		}
		
		setTimeout(  showmsg , 3 * 1000 );
	
		
    </script>
    
</div>


<div class="aboute_container" id="aboutId" style="display:none">

   <div class="aboute_right">
    	   <div class="aboute_list">产品信息:</div>
           <div class="aboute_child">硬件版本<span>：3.0</span></div>
           <div class="aboute_child">软件版本：<span id="versionName">V1.1.0.1</span></div>
           <div class="aboute_line" style="margin-left:0px;"></div>
           <div class="aboute_list">联系我们:</div>
           <div class="aboute_child">Website：<span>http://www.tvata.com</span></div>
           <div class="aboute_child">QQ：<span>582548392</span></div>
           <div class="aboute_child">E-mail：<span>sales@tvata.com</span></div>
       
           <div class="aboute_bottom">
               <span>天华雅歌  版权所有</span>
               <span>Copyright  ©2013  TVA  Corp.  All Rights  Reserved.</span>
           </div>
    </div>
  </div>
  

</body>
</html>
